package jwdt.xadmin.work.bean;


import jwdt.xadmin.system.bean.TUser;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_worklog", keys={"logid"}, comment="工作日志管理")
public class TWorkLog implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="logid", comment="ID")
	private Integer logid;
	
	@Column(value="projectid", comment="项目ID")
	private Integer projectid;
	
	@Column(value="content", comment="内容")
	private String content;
	
	@Column(value="dt", comment="创建时间")
	private String dt;
	
	@Column(value="userid", comment="记录人")
	private Integer userid;

	public Integer getLogid() {
		return logid;
	}

	public void setLogid(Integer logid) {
		this.logid = logid;
	}

	public Integer getProjectid() {
		return projectid;
	}

	public void setProjectid(Integer projectid) {
		this.projectid = projectid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDt() {
		return dt;
	}

	public void setDt(String dt) {
		this.dt = dt;
	}

	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	
	public String getProjectName(){
		TProject project = (TProject) Jdb.get().get(TProject.class, this.projectid);
		return project.getName();
	}
	
	public String getUsername(){
		TUser user = (TUser) Jdb.get().get(TUser.class, this.userid);
		return user.getUsername();
	}
}
